<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>添加用户</title>
	<link rel="stylesheet" href="${request.contextPath}/plugins/bootstrap/css/bootstrap.css">
	<link rel="stylesheet" href="${request.contextPath}/plugins/font-awesome/css/font-awesome.min.css"/>
	<link rel="stylesheet" href="${request.contextPath}/plugins/select2/select2.min.css">
	<link rel="stylesheet" href="${request.contextPath}/plugins/jquery-confirm/jquery-confirm.min.css">
	<link rel="stylesheet" href="${request.contextPath}/hadmin/css/animate.css">
	<link rel="stylesheet" href="${request.contextPath}/hadmin/css/style.css">
	<link rel="stylesheet" href="${request.contextPath}/hadmin/css/common.css">
</head>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="userAddForm">
							<div class="form-group">
								<label class="col-sm-2 control-label">用户名称：</label>
								<div class="col-sm-9">
									<input id="userName" name="userName" placeholder="请输入用户名" type="text" class="form-control" required>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">所属部门：</label>
								<div class="col-sm-9">
									<select id="deptId" name="deptId" class="form-control select2" style="width: 100%;" required>
										<option value="">请选择部门</option>
										<#list deptList as dept>
											<option value="${(dept.id)!}">${(dept.deptName)!}</option>
										</#list>
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">用户密码：</label>
								<div class="col-sm-9">
									<input type="password" class="form-control" id="password" name="password" placeholder="请输入密码" required>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">确认密码：</label>
								<div class="col-sm-9">
									<input type="password" class="form-control" id="password2" name="password2" placeholder="请再次输入密码" required>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">用户描述：</label>
								<div class="col-sm-9">
									 <input class="form-control" name="userDesc" placeholder="请输入描述，最多300个字符 ..." required>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">用户状态：</label>
								<div class="col-sm-9">
									<label class="radio-inline">
										<input name="userState" type="radio" value="1" required> 启用
									</label>
									<label class="radio-inline">
										<input name="userState" type="radio" value="-1"> 禁用
									</label>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">用户角色：</label>
								<div class="col-sm-9">
									<#list roleList as role>
										<label class="checkbox-inline" title="${(role.roleDesc)!}">
											<input type="checkbox" name="roleId" value="${(role.id)!}" required> ${(role.roleName)!}
										</label>
									</#list>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- 通用js引入 -->
	<script src="${request.contextPath}/plugins/jQuery/jQuery-2.1.4.min.js"></script>
	<script src="${request.contextPath}/plugins/bootstrap/js/bootstrap.min.js"></script>
	<script src="${request.contextPath}/plugins/select2/select2.full.min.js"></script>
	<script src="${request.contextPath}/plugins/layer/layer.min.js"></script>
	<script src="${request.contextPath}/plugins/laydate/laydate.js"></script>
	<script src="${request.contextPath}/plugins/jquery-confirm/jquery-confirm.min.js"></script>
	<script src="${request.contextPath}/plugins/validate/jquery.validate.min.js"></script>
	<script src="${request.contextPath}/plugins/validate/messages_zh.min.js"></script>
	<script src="${request.contextPath}/plugins/blockUI/jquery.blockUI.js"></script>
	<script src="${request.contextPath}/hadmin/js/content.js"></script>
	<script src="${request.contextPath}/hadmin/js/common.js?v=0.9"></script>
	<script>
		// 提交保存
		function submitHandler() {
			if ($("#userAddForm").validate().form()) {
				saveInfo('${request.contextPath}/system/sysuser/doAdd', $('#userAddForm').serialize());
			}
		}
	</script>
</body>
</html>
